﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using FinalProject.DAL.Model;
namespace FinalProject.BL
{
    public class InvoiceManagementBL : BaseBL<InvoiceDocument>
    {
        public static long GetLastestNumber()
        {
            try
            {
                long result = dalContext.InvoiceDocuments
                                        .Max(p => p.DocNumber) ?? 0;

                return result + 1;
            }
            catch (Exception)
            {

                throw;
            }
        }
    }
}
